/*********************************************************************************
 *      Copyright:  (C) 2022 Zhang Changxing<ZhangChangxingVIP@163.com>
 *                  All rights reserved.
 *
 *       Filename:  serial_init.h
 *    Description:  This file is used to create multithreads.
 *                 
 *        Version:  1.0.0(05/1/2022)
 *         Author:  Zhang Changxing <ZhangChangxingVIP@163.com>
 *      ChangeLog:  1, Release initial version on "05/1/2022  01:33:25 AM"
 *                 
 ********************************************************************************/

#ifndef  _MY_THREAD_H_
#define  _MY_THREAD_H_

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include "mosq.h"


/*-----------------------------------------------------------------------------
 *   description:   Create multiple threads, including both for 
 *                  MQTT connection and SMS sending and receiving
 *          args:   $iotd_ctx:    The context address used to create multithreads
 *  return value:   <0: failure,    =0:ok 
 *----------------------------------------------------------------------------*/
int mqtt_thread(iotd_ctx_t *iotd_ctx);

#endif